home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1923 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.0 KB

  1. Path: news.bridge.net!news
  2. From: David Byrden <100101.2547@compuserve.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: vietual data in C++?
  5. Date: 14 Jan 1996 04:48:58 GMT
  6. Organization: self-employed
  7. Message-ID: <4da1vq$6v3@news.bridge.net>
  8. References: <4d94cn$9vo@fnnews.fnal.gov>
  9. NNTP-Posting-Host: ppp-mia2-95.bridge.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  14.  
  15.  
  16. Oleg;
  17.  
  18. >> i want to implement something like virtual data 
  19.  
  20. I find it hard to understand exactly what you are saying, but
  21. there is no 'virtual data' here. The classes D1 and D2 are
  22. two different types (because they involve different 
  23. instantiations of the template Base). Virtual data, or
  24. virtual anything, is useful when the objects that you handle 
  25. have the SAME type.
  26.  
  27. The code is confusing because the name of the template
  28. parameter, Basedata, is the same as the name of the
  29. base class to which you are pointing. I wonder whether
  30. you are clear about what should happen here?
  31.  
  32.     David
  33.  
  34.  
  35.  
  36.